package world0;

public class Skill {
	
	private int skillNumber = 3;
	private int allSkillValue = 1;
	private int level = 0;
	
	/* hand weapons */
	
	/* Swords */
	int swordSkill = 1;
	int twoHandSwordSkill = 0;
	int twoOneHandSword = 0;

	/* Get the overall Level for Skills = Player Level */
	public int getLevel() {
		level = (int) ((allSkillValue) / skillNumber);
		if(level == 0) {
			level++;
		}
		return level; 
	}
	
	public void setLevel(int level) {
		this.level = level;
	}
	
	/* Getter und Setters */
	/***/
	public int getSwordSkill() {
		return swordSkill;
	}

	public void setSwordSkill(int swordSkill) {
		allSkillValue += swordSkill - this.swordSkill;
		this.swordSkill = swordSkill;
		
		if(swordSkill == 10) {
			twoHandSwordSkill += 1;
			allSkillValue++;
		}
	}
	
	/***/
	public int getTwoHandSwordSkill() {
		return twoHandSwordSkill;
	}
	
	public void setTwoHandSwordSkill(int twoHandSwordSkill) {
		allSkillValue += twoHandSwordSkill - this.twoHandSwordSkill;
		this.twoHandSwordSkill = twoHandSwordSkill;
		
		if(twoHandSwordSkill == 10) {
			twoOneHandSword += 1;
			allSkillValue++;
		}
	}
	
	/***/
	public int getTwoOneHandSword() {
		return twoOneHandSword;
	}
	
	public void setTwoOneHandSword(int twoOneHandSword) {
		allSkillValue += twoOneHandSword - this.twoOneHandSword;
		this.twoOneHandSword = twoOneHandSword;
	}
}
